﻿/*----------------------------------------------------------------
// Copyright (C) 2016 通通优品版权所有。
// 命名空间: STOWaybillMall.Products.Controllers
// 类名：ProductsController
// 功能描述：N/A
// 
// 创建标识：Roc.Lee(李鹏鹏) 2017/8/8 16:00:37 TEC-ROCLEE Roc.Lee

// 修改标识：
// 修改描述：
// 
//
//----------------------------------------------------------------*/
using Abp.AutoMapper;
using Abp.Domain.Uow;
using Abp.WebApi.Controllers;
using STOWaybillMall.IRepositories;
using STOWaybillMall.Products.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using static STOWaybillMall.Products.Dto.GetProductListOutput;

namespace STOWaybillMall.Products.Controllers
{
    /// <summary>
    /// 商品控制器
    /// </summary>
    [RoutePrefix("api/products")]
    public class ProductsController : AbpApiController
    {
        private readonly IProductAppService _IProductAppService;

        public ProductsController(IProductAppService _IProductAppService)
        {
            this._IProductAppService = _IProductAppService;
        }
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Route("list")]
        public GetProductListOutput GetProductList([FromUri]GetProductListInput input)
        {
            return _IProductAppService.GetProductList(input);

        }
        /// <summary>
        /// 详情
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [Route("detail")]
        public GetProductDetailOutput GetProductDetail([FromUri]GetProductDetailInput input)
        {
            return _IProductAppService.GetProductDetail(input); ;
        }
    }
}
